package com.pb.wkflow.api.mapper;

import com.pb.wkflow.api.controller.request.TaskHandOverQueryRequest;
import com.pb.wkflow.api.entity.TaskHandOverEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 苗益辉
 * @date 2022/12/26 16:13
 */
@Mapper
@Repository
public interface TaskHandOverMapper {

    /**
     * 查询
     * @param request request
     * @return List<TaskHandOverEntity>
     */
    List<TaskHandOverEntity> selectList(TaskHandOverQueryRequest request);

    /**
     * 新增
     * @param entity entity
     */
    void insert(TaskHandOverEntity entity);

    /**
     * 修改
     * @param entity entity
     */
    void edit(TaskHandOverEntity entity);

    /**
     * 删除
     * @param entity entity
     */
    void delete(TaskHandOverEntity entity);

    /**
     * 批量查询交接人
     * @param userIds userIds
     * @return List<TaskHandOverEntity>
     */
    List<TaskHandOverEntity> queryHandOverUserList(@Param("userIds") List<String> userIds);

    /**
     * 查询交接人
     * @param userId userId
     * @return TaskHandOverEntity
     */
    TaskHandOverEntity queryHandOverUser(@Param("userId") String userId);
}
